/**
 * Created by firefoxmmx2 on 17-7-5.
 */
Ext.define('YBB.view.login.Login', {
    extend: 'Ext.form.Panel',
    requires: [
        'YBB.view.login.LoginController'
    ],

    /*
     Uncomment to give this component an xtype
     xtype: 'login',
     */
    xtype: 'login',
    controller: 'login',
    fullscreen: true,
    reference: 'loginForm',
    layout: {
        type: 'vbox',
        align: 'stretch'
    },
    defaults: {
        margin: '0 0 5 0',
        height: 55,
        labelWidth: 95
    },
    bodyPadding: 10,
    items: [
        {
            xtype: 'textfield',
            allowBlank: false,
            name: 'mobilePhone',
            label: '手机号'
        },
        {
            xtype: 'panel',
            layout: 'hbox',

            items: [
                {
                    xtype: 'textfield',
                    allowBlank: false,
                    name: 'captchaCode',
                    label: '验证码',
                    flex: 0.8,
                    labelWidth: 95
                },
                {
                    xtype: 'img',
                    src: 'https://modao.cc/uploads3/images/1037/10379953/raw_1497851590.png',
                    flex: 0.2
                }
            ]
        },
        {
            xtype: 'panel',
            layout: 'hbox',
            defaults: {
                labelWidth: 95
            },
            items: [
                {
                    xtype: 'textfield',
                    label: '短信验证码',
                    name: 'smsDyCode',
                },
                {
                    xtype: 'button',
                    text: "获取验证码",
                    margin: {left: 5},
                    flex: 1
                }
            ]
        },
        {
            xtype: 'button',
            handler: 'onLoginClick',
            text: '登录'
        }
    ]
});